from transformers import AutoModel, AutoTokenizer

model_name = "hfl/chinese-roberta-wwm-ext"

# 下载模型和分词器
model = AutoModel.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

# 保存模型和分词器到本地目录
model.save_pretrained('./local_model_directory')
tokenizer.save_pretrained('./local_model_directory')
